package com.jk.smartelderlycare.dao;

import com.jk.smartelderlycare.entity.TbMessage;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description 添加描述
 * @Author hhk
 * @LastChangeDate 2024/11/27 19:19
 * @Version v1.0
 */
@Repository
public interface MessageRepository extends MongoRepository<TbMessage, String> {
    @Query("{'name': ?0, 'homestayId':?1}")
    List<TbMessage> findByNameAndHomestayId(String name, Long homestayId);
}
